<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8" />
    <title>通知公告</title>
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <include file="Public:iframe_header"/>
    <link rel="stylesheet" type="text/css" href="__STATIC__/mobile/css/ul-li.css"/>
    <style type="text/css">
 * {
	font-size: 95%;
	font-family: haettenschweiler;
}
 .div-jz{
	 text-align: center;
 }

 .div-jz button{
	 text-align: center;
	 border: 1px solid #F4F4F4;
	 color: #C8C7CC;
	 background-color: #F4F4F4;
 }
    </style>
</head>
<body>
    <div class="mui-content" style="background-color: #fff;">
        <div class="h-img">
			<img src="__STATIC__/mobile/img/notice.png" width="100%" />

			
		</div>
        
        <div class="qy-cont">
        	<div id="" class="qy-cx">
        		<div id="">
        			<b>查询筛选:</b> 
        		</div>
				<div id="" class="qy-div-2">

					<span id="btn_f"<switch name="$time"><case value='1'>style="color: #FF9B41;"</case><case value='0'></case></switch>  >通知中</span>| <span id="btn_s" <switch name="$time"><case value='1'></case><case value='0'>style="color: #FF9B41;"</case></switch>>通知期已过</span>
				</div>
			</div>
			<div id="" class="qy-se">
				<div class="qy-sj" id="sjid">
        			<span id="">
        			时间
        			</span>
					<if condition="$order =='0'">
						<div class="order" v="0" >

							<div class="div-top">

							</div>
							<div class="div-boom">

							</div>
						</div>
						<else />
						<div class="order" v="1" >
							<div class="div-boom" style="    transform: rotate(360deg);">

							</div>
							<div class="div-top" style="    transform: rotate(180deg);">

							</div>

						</div>
					</if>

				</div>
				<select name="province" style="border: 1px solid black;">
					<option >省</option>
					<volist name="province_list" id="vo">
						<option value="{$vo.id}" <if condition="$vo.id == $province">selected</if>>{$vo.name}</option>
					</volist>
				</select>
				<select name="city">
					<option value="">市</option>
					<volist name="city_list" id="vo">
						<option value="{$vo.id}" <if condition="$vo.id == $city">selected</if>>{$vo.name}</option>
					</volist>
				</select>
				<select name="country">
					<option value="">地区（县）</option>
					<volist name="country_list" id="vo">
						<option value="{$vo.id}" <if condition="$vo.id == $country">selected</if>>{$vo.name}</option>
					</volist>

				</select>
			</div>

			<div class="h-ss">
				<div class="h-qz">

					<select name="">
						<option value="">全站</option>
					</select>
				</div>
				<div class="h-inp">
					<input placeholder="输入关键字查找..." name="title"  value="{$title?$title:'';}" />
				</div>

				<div class="h-s-img">
<!--
	作者：offline
	时间：2018-06-27
	描述: 弃用
	<img src="__STATIC__/mobile/img/qy-ss.png" width="50%" height="100%" />
-->
					
					搜索
				</div>
			</div>
        </div>
        <div class="qy-tab">
        	<ul class="mui-table-view">
		             	<div class="gsgg">
		            		<div id="" class="gs">
		            			<img src="__STATIC__/mobile/img/cd-dt.png" style="width:1em;"/>&nbsp;&nbsp;<b>通知公告</b>
		            		</div>
		            		<div id="" class="gd">
		            			查看更多>
		            		</div>
		            	</div>
				<volist name="notice_result" id="vo">
					<li class="mui-table-view-cell" _href="{:url('notice/detail_continue')}" onclick="return_notice(this)" id="{$vo.id}">
						<div>
							{$vo.title}
						</div>
						<div>
							{$vo.take_time|date="Y-m-d",###}
						</div>
					</li>
				</volist>
			</ul>
        	
        </div>
    </div>
	<script type="text/javascript">
		mui.init();
	</script>
	<script>
		//    参数(url)
		var province = "{$province}";
		var city = "{$city}";
		var country = "{$country}";
		var v = "{$order}";
		var title = "{$title}";
		var time = "{$time}"
		var department = "{$department}"
		var page=1;

		//公示中 1
		$('#btn_s').click(function(){
			window.location.href = '/mobile/Notice/zindex.html?province='+province+'&city='+city+'&country='+country+'&order='+v+'&department='+department+'&title='+title+'&time='+0;
		});
		$('#btn_f').click(function(){
			window.location.href = '/mobile/Notice/zindex.html?province='+province+'&city='+city+'&country='+country+'&order='+v+'&department='+department+'&title='+title+'&time='+1;
		});

		//时间
		$('.order').click(function(){
			var v = $(this).attr('v');
			if(v==0){
				v=1;
			}else{
				v=0;
			}
			window.location.href = '/mobile/Notice/zindex.html?province='+province+'&city='+city+'&country='+country+'&order='+v+'&department='+department+'&title='+title+'&time='+time;
		});
		//省
		$("select[name='province']").change(function(){
			var province = $(this).val();
			var city = '';
			var country = '';
			window.location.href =  '/mobile/Notice/zindex.html?province='+province+'&city='+city+'&country='+country+'&order='+v+'&department='+department+'&title='+title+'&time='+time;
		});
		//		市
		$("select[name='city']").change(function(){
			var city = $(this).val();
			var country = '';
			window.location.href = '/mobile/Notice/zindex.html?province='+province+'&city='+city+'&country='+country+'&order='+v+'&department='+department+'&title='+title+'&time='+time;
		});
		//		地区
		$("select[name='country']").change(function(){
			var country = $(this).val();
			window.location.href = '/mobile/Notice/zindex.html?province='+province+'&city='+city+'&country='+country+'&order='+v+'&department='+department+'&title='+title+'&time='+time;
		});
		//		h-s-img全站搜索
		$(".h-s-img").click(function(){
			var title = $('input[name="title"]').val();

			window.location.href = '/mobile/Notice/zindex.html?province='+province+'&city='+city+'&country='+country+'&order='+v+'&department='+department+'&title='+title+'&time='+time;
		});

		//检测是否有权限
		function return_notice(obj){
			var a_href = $(obj).attr('_href');
			var id = $(obj).attr('id');

			var formData = new FormData();
			formData.append('id',id);

			$.ajax({
				url:a_href,
				type:'POST',
				data:formData,
				async:false,
				processData:false,
				contentType:false,
				success:function(result){
					if(result.code == 0){
						parent.tips(result.msg);
						return false;
					}
					window.location.href=result.url;
				}

			});
		}

		<!--点击加载-->

		$('.div-jz').click(function(){
			var body_height = $("body").height();

			page += 1 ;
			var index=parent.wait();

			$.ajax({
				type : "GET",
				url: '/mobile/Notice/zindex.html?province='+province+'&city='+city+'&country='+country+'&order='+v+'&department='+department+'&title='+title+'&time='+time+'&page='+page,
				data : {page:page},
				success: function(result) {
					parent.close_wait(index);
					var html = '';
					if (result.code == '1') {
						if(result.msg.data == '') {
							$('.div-jz').hide();
							parent.tips('没有新数据了');
						}
						var html = '';
						for(var i=0;i<result.msg.data.length;i++){
							html +='<li class="mui-table-view-cell" _href="{:url('Notice/detail_continue')}" onclick="return_Notice(this)" id="'+result.msg.data[i].id+'"><div>';
							html += result.msg.data[i].title
							html += '</div>	<div>';
							html += formatDateTime( result.msg.data[i].take_time);
							html += '</div></li>';
						}
						$('#tab').append(html);
					}
				}
			});

		});
	</script>
</body>
</html>